﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Login.ascx.cs" Inherits="UserControl_Login" %>
<style type="text/css">

    .style2
    {
        width: 357px;
        height: 48px;
    }
    .style1
    {
        width: 357px;
    }
    </style>
<asp:Label ID="Label6" runat="server" Text="登录测试页"></asp:Label>
<br />
<br />
<table style="width: 16%; height: 150px;">
    <tr>
        <td class="style2">
            <asp:Panel ID="Panel1" runat="server" Height="17px" HorizontalAlign="Center" 
                Width="185px">
                <asp:Label ID="Label3" runat="server" Text="Hi,"></asp:Label>
                <asp:Label ID="UsernameLabel" runat="server" Text="User"></asp:Label>
                <asp:Label ID="Label4" runat="server" Text="!"></asp:Label>
                <br />
                <asp:Button ID="logoutButton" runat="server" onclick="logoutButton_Click" 
                    Text="注销" />
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Panel ID="Panel2" runat="server" Height="130px" Width="190px">
                <asp:Label ID="Label1" runat="server" Text="用户名: "></asp:Label>
                <asp:TextBox ID="UsernameTextBox" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="Label2" runat="server" Text="密 码: "></asp:Label>
                &nbsp;&nbsp;
                <asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password"></asp:TextBox>
                <asp:Button ID="loginButton" runat="server" onclick="loginButton_Click" 
                    Text="登录" />
                &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                <asp:Button ID="registerButton" runat="server" Text="注册" 
                    onclick="registerButton_Click" />
            </asp:Panel>
        </td>
    </tr>
    </table>

<asp:Label ID="Label5" runat="server" Text="现有帐户:"></asp:Label>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="SqlDataSource">
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
            ReadOnly="True" SortExpression="ID" />
        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
        <asp:BoundField DataField="Password" HeaderText="Password" 
            SortExpression="Password" />
        <asp:BoundField DataField="Mail" HeaderText="Mail" SortExpression="Mail" />
        <asp:BoundField DataField="Telephone" HeaderText="Telephone" 
            SortExpression="Telephone" />
        <asp:BoundField DataField="Address" HeaderText="Address" 
            SortExpression="Address" />
        <asp:BoundField DataField="Postcode" HeaderText="Postcode" 
            SortExpression="Postcode" />
        <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" 
            SortExpression="CreateDate" />
        <asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
        <asp:BoundField DataField="Remark" HeaderText="Remark" 
            SortExpression="Remark" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    SelectCommand="SELECT * FROM [UserInfo]"></asp:SqlDataSource>


